package com.yuqiao.read.utils;

public class Animal {
    //修饰符+类型+变量名；

    private int id;
    private String name;
    private int age;
    private String gender;
    private int a;
    protected int b;
    public int c;
    int d;

     void say(){
        return;
    }
    //修饰符（private,protected,public,默认），返回类型（byte,short,int,long,float,double,char,boolen,String,任何类型），方法名，（方法参数）{}
    void setAge(int age){
        this.age = age;
    }
     int getAge(){
        return this.age;
    }

    public static void main(String[] args) {
        Animal animal = new Animal();
        animal.setAge(10);
        int age = animal.getAge();
        System.out.println("age = [" + age + "]");
        animal.say();
        char a = 'A';
        String b = "nihao";
        int x = 10;//()
        short y = 20;//(-32768 ~32767)
        byte z = 10;//(-128~ 127)
        byte xx = -128;
        //0000
        //1010
        //二进制转十进制
        //1




    }
//    byte,int,short,long,
//    float,double,boolean,char,

}
